package itman.springcloud.serviece.impl;

import itman.springcloud.mapper.BusinessMapper;
import itman.springcloud.po.Business;
import itman.springcloud.serviece.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BusinessServiceImpl implements BusinessService {
    @Autowired
    private BusinessMapper businessMapper;
    @Override
    public List<Business> listBusinessByOrderTypeId(Integer orderTypeId) {
        try {
            return businessMapper.listBusinessByOrderTypeId(orderTypeId);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public Business getBusinessById(Integer businessId) {
        try {
            return businessMapper.getBusinessById(businessId);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
